package org.jeecg.modules.user.withhold.service.impl;

import com.alipay.api.response.AlipayUserAgreementQueryResponse;
import org.jeecg.modules.user.withhold.entity.BikeMemberWithhold;
import org.jeecg.modules.user.withhold.mapper.BikeMemberWithholdMapper;
import org.jeecg.modules.user.withhold.service.IBikeMemberWithholdService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * @Description: 支付宝协议表
 * @Author: jeecg-boot
 * @Date:   2021-06-22
 * @Version: V1.0
 */
@Service
public class BikeMemberWithholdServiceImpl extends ServiceImpl<BikeMemberWithholdMapper, BikeMemberWithhold> implements IBikeMemberWithholdService {

    @Autowired
    private BikeMemberWithholdMapper bikeMemberWithholdMapper;


    @Override
    public int isnertWithhold(AlipayUserAgreementQueryResponse alipayUserAgreementQueryResponse) {

            BikeMemberWithhold bikeMemberWithhold = new BikeMemberWithhold();
            BeanUtils.copyProperties(alipayUserAgreementQueryResponse,bikeMemberWithhold);
        int insert = bikeMemberWithholdMapper.insert(bikeMemberWithhold);

        return insert;
    }
}
